<!--加载中-->
<template>
  <div class="loading">
    {{ ladingText }}
  </div>
</template>

<script>
export default {
  name: 'ScrollLading',
  props: {
    ladingText: String,
    viewportHeight: Number
  },
  watch: {
    viewportHeight(valNew) { // 高度居中
      let loading = document.querySelector('.loading')
      loading.style.height = valNew + 'px'
      loading.style.lineHeight = valNew + 'px'
    },
  }
}
</script>

<style>
.loading {
  width: 100% !important;
  text-align: center;
}
</style>